﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Windows.Forms;

public partial class Default3 : System.Web.UI.Page
{
    int s = 2;
    int m = 1;
    static int i = 70;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            hid_Ticker.Value = new TimeSpan(0, m, s).ToString();
        } 
    }
    protected void Timer1_Tick(object sender, EventArgs e)
    {
        //hid_Ticker.Value = TimeSpan.Parse(hid_Ticker.Value).Add(new TimeSpan(0, 0, -1)).ToString();
        //lit_Timer.Text = "Time spent on this page: " + hid_Ticker.Value.ToString();
        i--;
        TimeSpan ts = new TimeSpan(0, 0, i);

        lit_Timer.Text = ts.ToString();
         
    }

    protected void btn_Submit_Click(object sender, EventArgs e)
    {
        lit_Name.Text = "Thanks. Your name is: " + fld_Name.Text;
    }
}
